﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Winista.Text.HtmlParser;
using Winista.Text.HtmlParser.Tags;
using Winista.Text.HtmlParser.Filters;
using Winista.Text.HtmlParser.Util;


namespace RentAHouse
{
    /// <summary>
    ///Koubei 的摘要说明
    /// </summary>
    public class Koubei
    {
        public Koubei()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }

        public string Parse(string url)
        {
            try
            { 
                Parser parser = new Parser(new Uri(url,UriKind.Absolute));
                NodeList nodes = parser.Parse(new TagNameFilter("body"));

                return nodes[0].ToHtml();
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
        
        }
    }
}